<template>
  <div class="error">
    <FixedHeight>
      <div class="content">
        <img src="@/assets/error.png" alt="" />
        <!-- <img src="@/assets/404.png" alt="" /> -->
        <span>{{ title }}</span>
        <el-button type="danger" @click="goback">回到首页</el-button>
      </div>
    </FixedHeight>
  </div>
</template>

<script setup>
const props = defineProps({
  title: {
    type: String,
    default: "Sorry, there are some problems with this page."
  }
})
import FixedHeight from "@/components/base/FixedHeight.vue";
import { useRouter } from "vue-router";
const router = useRouter();
const goback = () => {
  router.replace("/");
};
</script>
<style scoped lang="scss">
.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;

  img {
    width: 800px;
    // height: 400px;
    border-radius: 10px
  }

  span {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0px;
    line-height: 25px;
    color: rgba(45, 45, 50, 1);
    text-align: center;
    vertical-align: top;
    margin-top: 10px;
    margin-bottom: 5px;
  }
}
</style>
